#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include <QLabel>
#include <QPaintEvent>
#include <QMessageBox>
#include <QComboBox>
#include <QSpinBox>
#include <QTextBrowser>
#include <QLineEdit>
#include <QPixmap>
#include <QPainter>
#include <QSqlDatabase>
#include <QSqlError>
#include <QDebug>
#include <QProgressBar>
#include <QRadioButton>
#include <QSqlQuery>
#include <QFile>
#include <QFileInfo>
#include <QFileDialog>


#include "add_student.h"
#include "modify.h"

namespace Ui {
class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT

public:
    explicit Dialog(QWidget *parent = 0);
    ~Dialog();
    void createTable();
    void insertRow();
    void connect2DB();//连接数据库
    bool isExist(QString i);

private slots:

    void on_pushButton_7_clicked();

    void on_pushButton_add_clicked();

    void add_close_slot();

    void on_pushButton_delete_clicked();

    void on_pushButton_modify_clicked();

    void on_pushButton_searchall_clicked();

    void on_pushButton_open_clicked();

    void on_pushButton_8_clicked();

protected:

    virtual void paintEvent(QPaintEvent*event);

private:
    Ui::Dialog *ui;
    QSqlDatabase db;
    QString srcPath; // 要读的路径
    QString tarPath;

};

#endif // DIALOG_H
